<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/zeitgeist_administrator.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Zeitgeist Administrator - Manage application actions</title>
<!-- InstanceEndEditable -->

<link rel="stylesheet" href="@@{templatepath}@@/css/main.css" type="text/css" />

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-ui-1.7.2.custom.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tooltip.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.filter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.pager.js"></script>

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/chili-1.7.pack.js"></script>

<script language="JavaScript" type="text/javascript">

	$(function() {
		$('#set1 *').tooltip();

		$("#block").click($.tooltip.block);
	});
	
</script>

<!-- InstanceBeginEditable name="head" -->

<script language="JavaScript" type="text/javascript">

$(document).ready(function() 
    { 

		$("#usertable")
		.tablesorter({widthFixed: true, widgets: ['zebra']}) 
		.tablesorterPager({container: $("#pager"), positionFixed: false})
		.tablesorterFilter({filterContainer: "#filter-box",
                            filterClearContainer: "#filter-clear-button",
                            filterColumns: [0, 1, 2]});

		; 
    } 
); 

	function deleteAction(id, name)
	{
		var answer = window.confirm("Do you really want to delete the action '" + name + "'?");

		/* Question icon, Yes/No button. */
		/* 0 = error, 1 = OK, 2 = Cancel, 3 = No, 4 = Yes */

		if (answer == true)
		{
		   window.location.href = "@@{[setup.deleteaction]}@@"+"&id="+id;
		}
	}	

</script>

<!-- InstanceEndEditable -->
</head>

<body>

	<!-- navigation starts here -->
	<div id="nav">
		
		<h3>Zeitgeist Administrator v2 - <a href="@@{[projects.index]}@@" id="projectlink">@@{activeproject}@@</a></h3>
	
	</div>

	<!-- header starts here -->
	<!-- TemplateBeginBlock name="mainmenu" -->
	<div id="header">	
	
        	<div id="topnavleft">
                <a href="@@{[main.index]}@@"><img src="@@{templatepath}@@/images/icons/home_128.png" id="naviconleft" alt="Home" title="Home" border="0"/></a>
                <a href="@@{[setup.index]}@@"><img src="@@{templatepath}@@/images/icons/setup_128.png" id="naviconleft" alt="Setup application" title="Setup application" border="0" /></a>
                <a href="@@{[users.index]}@@"><img src="@@{templatepath}@@/images/icons/user_128.png" id="naviconleft" alt="Manage users" title="Manage users" border="0" /></a>
                <a href="@@{[projects.index]}@@"><img src="@@{templatepath}@@/images/icons/projects_128.png" id="naviconleft" alt="Manage Zeitgeist Administrator projects" title="Manage Zeitgeist projects" border="0" /></a>
            </div>

        	<div id="topnavright">
                <a href="@@{[main.info]}@@"><img src="@@{templatepath}@@/images/icons/info_128.png" id="naviconright" alt="Info" border="0" /></a>
                <a href="@@{[main.logout]}@@"><img src="@@{templatepath}@@/images/icons/exit_128.png" id="naviconright" alt="Logout" title="Logout" border="0" /></a>
			</div>
            <div style="clear:both;"></div>

	</div>	
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usermessages" -->
		<h3 class="usermessage"><img src="@@{templatepath}@@/images/icons/ok_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usermessage}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="userwarnings" -->
		<h3 class="userwarning"><img src="@@{templatepath}@@/images/icons/warning_32.png" alt="" align="left" style="margin-right:5px;" /> @@{userwarning}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usererrors" -->
		<h3 class="usererror"><img src="@@{templatepath}@@/images/icons/error_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usererror}@@</h3>
	<!-- TemplateEndBlock -->	
				
	<!-- content-wrap starts here -->
	<div id="content-wrap">
    <div id="content">	 

		<div id="sidebar" >	
        <!-- InstanceBeginEditable name="sidebar" -->

			<h3>Managing actions</h3>			
			<p>Here you can see all the actions of your application.</p>
            <p>By default the list is sorted by ID, which should in most cases also represent the order of creation in descending order. Use the row titles to sort the list to your liking.</p>
            <p>Use the icons to the right to either edit a action or delete it. Notice that you can't restore deleted action with this tool.</p>
            <p>The search will filter by ID as well as the action name and description as you type. Note that it's case insensitive. Use the "Clear" button to reset the filter and show all actions.</p>
            
		<!-- InstanceEndEditable -->
		</div>	
	
		<div id="main">		
        <!-- InstanceBeginEditable name="main" -->

			<h2>Manage application actions</h2>

			<table id="controltable" border="0" cellpadding="0" cellspacing="5" width="100%">
			<tr>
				<td>
				<p>
					<a href="@@{[setup.createaction]}@@" alt="Create a new action"><img src="@@{templatepath}@@/images/icons/new_22.png" alt="Create a new action" title="Create a new action" border="0" align="absmiddle" /></a>
					<a href="@@{[setup.createaction]}@@" alt="Create a new action">Create a new action</a>
				</p>
				</td>
				<td class="filter">
				<p style="text-align:right;">
					Search: 
					<input name="filter" id="filter-box" value="" maxlength="50" size="30" type="text">
					<input id="filter-clear-button" type="submit" value="Clear"/>
				</p>
				</td>
			</tr>
			</table>

            <table id="usertable" border="0" cellpadding="0" cellspacing="5" width="100%">
	       	<thead>   
	        <tr>
				<th><p>Action name</p></th>
				<th><p>Description</p></th>
				<th><p>Module</p></th>
				<th><p style="text-align:center;">Actions</p></th>
	        </tr>
            </thead>
            <tbody>
            <!-- TemplateBeginBlock name="applicationaction" -->            
                <tr>
				<td id="listtable"><p>@@{action_name}@@</a></p></td>
				<td id="listtable"><p>@@{action_description}@@</a></p></td>
				<td id="listtable"><p>@@{module_name}@@</a></p></td>
				<td id="listtable" align="center"><p><nobr>
					<a href="@@{[setup.editaction]}@@&id=@@{action_id}@@" alt="Edit action">
						<img src="@@{templatepath}@@/images/icons/edit_22.png" alt="Edit action" title="Edit action '@@{action_name}@@'" border="0" />
					</a> &nbsp; 
					<a href="javascript:deleteModule(@@{action_id}@@, '@@{action_name}@@')" alt="Delete action">
						<img src="@@{templatepath}@@/images/icons/delete_22.png" alt="Delete action" title="Delete action '@@{action_name}@@'" border="0" />
                    </a>
				</nobr></p></td>
                </tr>
            <!-- TemplateEndBlock -->
            </tbody>
            </table>

            <div id="pager" class="pager">
				<form class="noborder">
	            <table id="pagertable" border="0" cellpadding="0" cellspacing="5" width="100%">
                <tr><td>
					<img src="@@{templatepath}@@/images/icons/2leftarrow_22.png" class="first"/>&nbsp;
					<img src="@@{templatepath}@@/images/icons/1leftarrow_22.png" class="prev"/>
				</td><td align="right">
					<input type="text" class="pagedisplay" style="text-align:center;"/>
				</td><td>
					<select class="pagesize">
						<option selected="selected"  value="10">&nbsp;10&nbsp;</option>
						<option value="20">&nbsp;20&nbsp;</option>
						<option value="30">&nbsp;30&nbsp;</option>
						<option  value="40">&nbsp;40&nbsp;</option>
					</select>
				</td><td align="right">
					<img src="@@{templatepath}@@/images/icons/1rightarrow_22.png" class="next"/>&nbsp;
					<img src="@@{templatepath}@@/images/icons/2rightarrow_22.png" class="last"/>
				</td></tr>
				</table>
				</form>
            </div>

		<!-- InstanceEndEditable -->
		</div>					
		
	<!-- content-wrap ends here -->		
	</div>
    </div>

	<!-- footer starts here-->	
	<div id="footer-wrap">
		
		<div id="footer-bottom">		
			<p>
			&copy; 2009 <strong><a href="http://www.menschenwerk.net">Menschenwerk.net</a></strong> | 
			Original template design: <a href="http://www.styleshout.com/">styleshout</a> | 
            Icons by: <a href="http://www.icon-king.com/projects/nuvola/">David Vignoni</a>
			</p>		
		</div>	
	
	<!-- footer ends-->		
	</div>

</body>
<!-- InstanceEnd --></html>
